<template>
  <t-image-viewer v-if="!store.isMobileType" v-model:visible="ImgVisible" :images="[urls + props.info.value]">
  </t-image-viewer>
  <van-image-preview :show-index="false" v-else v-model:show="ImgVisible" :images="[urls + props.info.value]">
  </van-image-preview>
  <div class="outline-parent jy-style-height">
    <div class="flex-box">
      <div class="Showroom-parent" v-if="props.info.digitalShowroom">
        <digitalShowroomInfo :url="props.info.digitalShowroom" :id="props.info.id" />
      </div>
      <img
        class="outline-parent-bg"
        :src="
          publicUrls + 'free/style16/Level2outlineStyle1Bg.webp'
        "
        alt=""
      />
      <div class="outline border-hover-style">
        <div class="outline-content">
          <div class="content-title">
            <div class="line">
              <div class="line1"></div>
              <div class="line1"></div>
            </div>
            <div class="title-box" v-html="textType(props.info.text)"></div>
            <div class="title-box3">
              <div class="title-box title-box2" v-html="textType(props.info.text)"></div>
              <div class="shadown"></div>
            </div>
          </div>
          <div class="outline-subTitle" v-if="props.info.subTitle">
            <span class="line"></span>{{ props.info.subTitle }}
          </div>
          <TextMax
            v-if="props.domShow"
            :data="props.info.remarks"
            :title="props.info.text"
            :row="props.info.value ? 4 : 9"
          ></TextMax>
          <div class="outline-cover" v-if="props.info.value">
            <img
              @click="ImgVisible = true"
              :src="urls + props.info.value + '?imageView2/3/w/600/h/600/format/webp'"
              alt=""
            />
          </div>
        </div>
      </div>
    </div>
  </div>
</template> 

<script lang="ts">
export default defineComponent({
  name: 'free16Style1',
});
</script>

<script setup lang="ts">
import { publicUrls, textType } from '@/utils/minxin';
import digitalShowroomInfo from '@/freeComponents/unitdigitalShowroom/style16.vue';
import textMode from '../../../textMode/textMode.vue';
import { urls } from '@/utils/request/upload';
import TextMax from '@/freeComponents/textMode/TextMax.vue';
import { defineComponent, ref } from 'vue';
import { useProjectStore } from '@/store';
const store = useProjectStore();

const ImgVisible = ref(false);

const props = defineProps({
  info: {
    type: Object,
  },
  domShow: {
    type: Boolean,
  },
});

// 跳转全景链接
const open = (url: any) => {
  if (url) {
    window.open(url, '_blank');
  }
};
</script>

<style scoped lang="less">
.outline-parent {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  margin-right: 280px;
}
.flex-box {
  width: 474px;
  height: 774px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.outline-parent-bg {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
.outline {
  z-index: 20;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding-left: 86px;
  padding-right: 96px;
}
.outline-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  padding-top: 349px;
  padding-bottom: 40px;
  position: relative;
}
.tiitleMargin {
  margin-bottom: 30px !important;
}
.outlineHeight {
  margin-top: 10px;
}
.title2 {
  height: 100% !important;
  padding-bottom: 130px !important;
  margin-bottom: 0 !important;
  ::v-deep p {
    letter-spacing: 12px !important;
  }
}
.content-title {
  max-width: 62px;
  position: absolute;
  top: 0;
  right: -18px;
  .line {
    width: calc(100% - 8px);
    height: 90px;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    .line1 {
      width: 2px;
      height: 100%;
      background: rgba(170, 170, 170, 1);
      box-shadow: 2px 0px 1px 0px rgba(0, 0, 0, 0.1);
    }
  }
  .title-box {
    max-width: 60px;
    max-height: 232px;
    border: 3px solid rgba(138, 122, 106, 1);
    display: flex;
    justify-content: center;
    position: relative;
    margin: 0 auto;
    ::v-deep p {
      font-family: SourceHanSerifCN-Bold;
      font-size: 24px;
      line-height: 26px;
      text-align: center;
      color: #f3efe8;
      writing-mode: vertical-rl;
      text-orientation: upright;
      letter-spacing: 1px;
      margin-top: 8px;
      color: #8a7a6a;
      &:nth-child(2) {
        margin-left: 6px;
      }
    }
  }
  .title-box3 {
    max-width: 60px;
    max-height: 232px;
    position: absolute !important;
    top: 105px;
    z-index: -1;
    .title-box2 {
      opacity: 0.2;
      ::v-deep p {
        font-family: SourceHanSerifCN-Bold;
        font-size: 24px;
        line-height: 26px;
        text-align: center;
        color: #f3efe8;
        writing-mode: vertical-rl;
        text-orientation: upright;
        letter-spacing: 1px;
        margin-top: 8px;
        color: #8a7a6a;
        &:nth-child(2) {
          margin-left: 6px;
        }
      }
    }
    .shadown {
      position: absolute;
      top: -10px;
      left: 50%;
      transform: translateX(-50%);
      width: 190%;
      height: 120%;
      background: url(https://static.jiyi.show/free/style16/Level2outlineStyle1TitleBg.webp)
        no-repeat center/100% 100%;
      z-index: -2;
    }
  }
}
.outline-subTitle {
  width: 100%;
  text-align: center;
  font-family: SourceHanSerifCN;
  font-size: 18px;
  line-height: 28px;
  text-align: center;
  margin-bottom: 16px;
  color: #8a7a6a;
  .line {
    width: 30px;
    height: 1.5px;
    background: #8a7a6a;
    display: inline-block;
    margin-bottom: 5px;
    margin-right: 2px;
  }
}
.outline-cover {
  width: 100%;
  flex: 1;
  overflow: hidden;
  background: #d9d9d9;
  &:hover img {
    transform: scale(1.2);
  }
  img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
  }
}

.Showroom-parent {
  position: absolute;
  top: 10px;
  left: 40px;
  z-index: 21;
}
::v-deep .textMore-box {
  margin-bottom: 16px;
}
::v-deep .van-text-ellipsis {
  font-family: PingFang SC !important;
  font-size: 16px !important;
  color: #333 !important;
  line-height: 32px !important;
}
::v-deep .van-text-ellipsis__action::before {
  color: #333 !important;
  font-weight: 800 !important;
}
</style>